package com.system.web;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @date 2021-5-11
 * @author dave
 * 实现富文本编辑器文件上传默认访问路径及文件路径加载；
 */
@Configuration
public class UploadFilePathConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/public/image/**").addResourceLocations("file:D:\\uploadData\\file\\images\\");
        super.addResourceHandlers(registry);
    }

}